:root {
  --bg-color: #f3f6f9;
  --border-color: #ddd;
  --shadow-color: rgba(0, 0, 0, .25);
}

* {padding: 0; margin: 0; font: inherit; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-overflow-scrolling: touch;
  -webkit-text-size-adjust: 100%;
}
html, body {height: 100%; overflow: hidden;}
ul, li {list-style: none; margin: 0;}
a:not(.btn, [class^=text-]):link,
a:not(.btn, [class^=text-]):hover,
a:not(.btn, [class^=text-]):active,
a:not(.btn, [class^=text-]):visited,
a:not(.btn, [class^=text-]):focus,
a:not(.btn, [class^=text-]) {color: inherit; text-decoration: none;}
strong, .bold {font-weight: bold;}

.f12 {font-size: 12px;}
.f14 {font-size: 14px;}
.f16 {font-size: 16px;}
.f18 {font-size: 18px;}

* + .btn {margin-left: .6em;}
.btn + * {margin-left: .6em;}
[class^=bi-] + *,
.glyphicon + * {margin-left: .4em}
.glyphicon-list-alt,
.glyphicon-send,
.glyphicon-filter,
.glyphicon-trash,
.glyphicon-flag {top: 2px;}
.glyphicon {cursor: pointer;}

.el-popper {
  padding: 0;
  & > pre {
    max-width: 50vw; max-height: 45vh;
    padding: .5em .75em; margin: 0;
    background: transparent;
    border: none;
    color: inherit; overflow: auto;
  }
}

.c {text-align: center;}
.p {cursor: pointer;}
.fl {float: left;}
.fr {float: right;}
.ib {display: inline-block; vertical-align: middle;}
.abs-r {position: absolute; right: 0; top: 50%; transform: translateY(-50%);}
.inner {display: inline-block; position: relative;}
.cy {display: flex; align-items: center;}
.unselect {user-select: none;}
.space {padding: 1em;}
.space2 {padding: .75em 1em;}
.ib.space {padding-top: 0;}
textarea.form-control {min-width: 36em; min-height: 18em;}
.glb {
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  line-height: 26px;
  padding: .4em 1em;
  background: var(--bg-color);
  box-shadow: 0 1px 0 #fff inset;
  display: flex;
  & > .auto-flex {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  &.block {display: block;}
  & > * + * {margin-left: 1.5em;}
  & + .glb {border-top: none;}
}

.smooth-scroll {scroll-behavior: smooth;}
.auto-flex {flex: 1; position: relative; z-index: 1;}
.flex {
  display: flex;
  & > * {
    position: relative;
    &:not(.auto-flex) {z-index: 2;}
    & + * {margin-left: 1em;}
  }
}
.flex-h {
  display: flex;
  & > * {
    position: relative;
    &:not(.auto-flex) {z-index: 2;}
    & + * {margin-left: 1em;}
  }
}
.flex-v {
  height: 100%;
  display: flex; flex-direction: column;
  & > .auto-flex {overflow: auto;}
  & > * {
    position: relative;
    &:not(.auto-flex) {z-index: 2;}
  }
  & > .glb:first-child {border-top: none;}
  & > .glb:last-child {border-bottom: none;}
}
.layout-h {
  height: 100%; display: flex;
  & > .auto-flex {
    overflow: auto;
  }
}

.title-bar {
  margin-bottom: 1.5em;
  display: flex;
  & > div {position: relative;}
  & > .auto-flex {
    padding-left: 1.2em;
    display: flex; align-items: center;
    &:before {
      content: "";
      border-radius: 4px;
      width: 6px; height: 20px; background: #09f;
      position: absolute; left: 0; top: 50%;
      transform: translateY(-50%);
    }
    strong {font-size: 16px;}
  }
}

table.table-data {
  border-collapse: collapse;
  white-space: nowrap;
  th, td {
    position: relative;
    background: #fff; border: 1px solid #ddd; padding: 8px 10px;
  }
  thead {
    tr {
      th {
        border-top: none;
        border-bottom: none;
        box-shadow: 0 1px 0 #ddd inset, 0 -1px 0 #ddd inset;
        background: var(--bg-color);
        font-weight: bold;
      }
    }
  }
  &.table-striped tbody {
    tr:nth-child(even) {
      td {background: var(--bg-color);}
    }
  }
  &.table-fix-thead {
    thead {
      position: sticky; left: 0; top: 0; z-index: 3;
    }
  }
  &.table-fix-r:has(tbody > tr > td:nth-child(2)) {
    tr {
      th:last-child,
      td:last-child {
        position: sticky; right: 0; z-index: 2;
        &:before {
          content: "";
          width: 10px; height: 100%;
          position: absolute; right: 100%; top: 0;
          background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .2));
          pointer-events: none;
        }
      }
    }
  }
}

#app {height: 100%;}
